﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AWA.VAT.DbAccess.Excel
{
    // useful for Excel emailing
    public class PersonInfo
    {
        #region Properties
        public string RealName { get; set; }
        public string Email { get; set; }
        public bool Sent { get; set; }

        #region Address
        public string Address
        {
            get
            {
                return String.Format("{0}\n{1}, {2} {3}\n{4}",
                    StreetAddress, City, State, ZIP, Country);
            }
        }

        private string _streetAddress;
        public string StreetAddress
        {
            get
            {
                if (_streetAddress == null)
                    return String.Empty;
                return _streetAddress;
            }
            set
            {
                _streetAddress = value;
            }
        }

        private string _city;
        public string City
        {
            get
            {
                if (_city == null)
                    return String.Empty;
                return _city;
            }
            set
            {
                _city = value;
            }
        }

        private string _state;
        public string State
        {
            get
            {
                if (_state == null)
                    return String.Empty;
                return _state;
            }
            set
            {
                _state = value;
            }
        }

        private string _zip;
        public string ZIP
        {
            get
            {
                if (_zip == null)
                    return String.Empty;
                return _zip;
            }
            set
            {
                _zip = value;
            }
        }

        private string _country;
        public string Country
        {
            get
            {
                if (_country == null)
                    return String.Empty;
                return _country;
            }
            set
            {
                _country = value;
            }
        }
        #endregion
        #endregion

        public override string ToString()
        {
            return String.Format("{0} ({1})", RealName, Email);
        }
    }
}
